Component({
  data: {
    showId: 1,
    collapseData: [
      { id: 1, title: "折叠面板标题1" },
      { id: 2, title: "折叠面板标题2" },
      { id: 3, title: "折叠面板标题3" },
      { id: 4, title: "折叠面板标题4" },
    ]
  },
  methods: {
    collapseHiddenHandle(e) {
      let index = e.currentTarget.dataset.index;
      if (this.data.showId === index) {
        index = 0;
      }
      this.setData({
        showId: index
      });
    }
  }
});